home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 989 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  3.8 KB

  1. Subject: Re:  future of MiNT
  2. Date: Wed, 9 Feb 94 20:49:54 CET
  3. From: Juergen Lock <nox@jelal.north.de>
  4. In-Reply-To: <199402081906.LAA19773@mail.netcom.com>; from "Eric R. Smith" at Feb 8, 94 11:06 am
  5. Message-Id: <9402091949.AA00264@jelal.north.de>
  6.  
  7. Eric R. Smith writes:
  8.  
  9. > Actually, I have been (slowly) working my way through the accumulated
  10. > patches to 1.09. What I can do is send out a 1.10 next week, that may or
  11. > may not include everyone's favorite patches; I would then suggest that
  12. > you send me diffs relative to that, and we can produce a 1.11 for
  13. > release. How does that sound?
  14.  
  15.  sounds good!
  16.  
  17.  here is my 1.09 version of the select()-after-XKEY-single-char-read fix...
  18.  
  19. diff -ru ../console.c ./console.c
  20. --- ../console.c    Tue May  4 17:42:38 1993
  21. +++ ./console.c    Sun Jul 11 02:08:50 1993
  22. @@ -7,6 +7,8 @@
  23.  
  24.  #include "mint.h"
  25.  
  26. +extern char vt52xkey[];
  27. +
  28.  /*
  29.   * These routines are what Cconout, Cauxout, etc. ultimately call.
  30.   * They take an integer argument which is the user's file handle,
  31. @@ -28,6 +30,13 @@
  32.      r = 1;        /* default is to assume input waiting (e.g. TOS files)*/
  33.      (void)(*f->dev->ioctl)(f, FIONREAD, &r);
  34.  
  35. +    if (!r && is_terminal(f)) {
  36. +        struct tty *tty = (struct tty *)f->devinfo;
  37. +        int scan = tty->state & TS_ESC;
  38. +
  39. +        if (scan && (tty->xkey ? tty->xkey[scan] : vt52xkey[scan]))
  40. +            r = 1;
  41. +    }
  42.      return r;
  43.  }
  44.  
  45. diff -ru ../dosfile.c ./dosfile.c
  46. --- ../dosfile.c    Thu Jun 24 20:36:08 1993
  47. +++ ./dosfile.c    Sun Jul 11 03:01:02 1993
  48. @@ -8,6 +8,8 @@
  49.  
  50.  #include "mint.h"
  51.  
  52. +extern char vt52xkey[];
  53. +
  54.  static long do_dup P_((int,int));
  55.  static void unselectme P_((PROC *));
  56.  
  57. @@ -925,6 +926,14 @@
  58.          r = (*f->dev->ioctl)(f, cmd, (void *)arg);
  59.          if (r == EINVFN && is_terminal(f)) {
  60.              r = tty_ioctl(f, cmd, (void *)arg);
  61. +        } else if (cmd == FIONREAD && !r && !(*(long *)arg) &&
  62. +                is_terminal(f)) {
  63. +            struct tty *tty = (struct tty *)f->devinfo;
  64. +            int scan = tty->state & TS_ESC;
  65. +
  66. +            if (scan && (tty->xkey ? tty->xkey[scan] :
  67. +                    vt52xkey[scan]))
  68. +                *(long *)arg = 1;
  69.          }
  70.          return r;
  71.      }
  72. @@ -1007,8 +1016,15 @@
  73.  
  74.      for (i = 0; i < MAX_OPEN; i++) {
  75.          if (rfd & mask) {
  76. +            struct tty *tty;
  77. +            int scan;
  78. +
  79.              f = p->handle[i];
  80. -            if ((*f->dev->select)(f, (long)p, O_RDONLY)) {
  81. +            if ((*f->dev->select)(f, (long)p, O_RDONLY) ||
  82. +                (is_terminal(f) &&
  83. +                (scan = (tty=(struct tty *)f->devinfo)->state & TS_ESC) &&
  84. +                (tty->xkey ? tty->xkey[scan] :
  85. +                    vt52xkey[scan]))) {
  86.                  count++;
  87.                  *rfdp |= mask;
  88.              }
  89. diff -ru ../tty.c ./tty.c
  90. --- ../tty.c    Thu Jun 24 20:37:28 1993
  91. +++ ./tty.c    Sun Jul 11 01:49:02 1993
  92. @@ -233,7 +233,7 @@
  93.  
  94.  /* for RAW mode, if there are no more characters then break */
  95.          if ( (mode & (T_RAW|T_CBREAK)) &&
  96. -            !((rdmode & ESCSEQ) && (tty->state & TS_ESC))) {
  97. +            !(tty->state & TS_ESC)) {
  98.              r = 1;
  99.              (void)(*f->dev->ioctl)(f, FIONREAD, &r);
  100.              if (r <= 0) break;
  101. @@ -375,7 +375,7 @@
  102.   *        28-31 are shift+cursor up, down, right, and left
  103.   */
  104.  
  105. -static char vt52xkey[256] = {
  106. +char vt52xkey[256] = {
  107.  '\033', 'P', 0, 0, 0, 0, 0, 0,
  108.  '\033', 'Q', 0, 0, 0, 0, 0, 0,
  109.  '\033', 'R', 0, 0, 0, 0, 0, 0,
  110. @@ -665,19 +665,15 @@
  111.  /* we may be in the middle of an escape sequence */
  112.      scan = (tty->state & TS_ESC);
  113.      if (scan != 0) {
  114. -        if (mode & ESCSEQ) {
  115. -            tab = tty->xkey ? tty->xkey : vt52xkey;
  116. -            r = (unsigned char) tab[scan++];
  117. -            if (r) {
  118. -                c = UNDEF;
  119. -                if (tab[scan] == 0) scan = 0;
  120. -            }
  121. -            else
  122. -                scan = 0;
  123. -            tty->state = (tty->state & ~TS_ESC) | scan;
  124. +        tab = tty->xkey ? tty->xkey : vt52xkey;
  125. +        r = (unsigned char) tab[scan++];
  126. +        if (r) {
  127. +            c = UNDEF;
  128. +            if (tab[scan] == 0) scan = 0;
  129.          }
  130.          else
  131. -            tty->state &= ~TS_ESC;
  132. +            scan = 0;
  133. +        tty->state = (tty->state & ~TS_ESC) | scan;
  134.      }
  135.  
  136.      while (c != UNDEF) {
  137.  
  138.  chhers
  139.     Juergen
  140. -- 
  141. J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
  142.                                 ...ohne Gewehr
  143. PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 
  144.